//
//  NSArray+GJLog.m
//  xmgjAppFront
//
//  Created by ZekiMini on 2021/1/18.
//  Copyright © 2021 guojutech. All rights reserved.
//

#import "NSArray+GJLog.h"
#import <objc/runtime.h>
@implementation NSArray (GJLog)


+ (void)load{
    Method old = class_getInstanceMethod(self, @selector(description));
    Method new = class_getInstanceMethod(self, @selector(gj_description));
    method_exchangeImplementations(old, new);

    {
        Method old = class_getInstanceMethod(self, @selector(descriptionWithLocale:));
        Method new = class_getInstanceMethod(self, @selector(gj_descriptionWithLocale:));
        method_exchangeImplementations(old, new);
    }
}

- (NSString *)gj_description{
    NSString *description = [self gj_description];
    description = [NSString stringWithCString:[description cStringUsingEncoding:NSUTF8StringEncoding] encoding:NSNonLossyASCIIStringEncoding];
    return description;
}

- (NSString *)gj_descriptionWithLocale:(id)local{
    return [self description];
}

@end
